package com.lzp.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @description: 定时调度任务类
 * @author: lzp
 * @createTime: 2021-08-09 21:36
 **/
//@Component
public class SchedulerTask {

    @Scheduled(fixedRate = 3000)
    public void printLog() {
        System.out.println("每隔3秒");
    }

    @Scheduled(cron = "0/1 * * * * ?")
    public void printLogInterval() {
        System.out.println("每隔1秒");
    }
}
